package com.wxtl.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.struts2.json.annotations.JSON;

/**
 * Agent entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "agent", catalog = "upweb")
public class Agent implements java.io.Serializable {

	// Fields

	private Integer agentId;
	private String agentsn;
	private String name;
	private String password;
	private String salt;
	private String linkman;
	private String tel;
	private String area;
	private String channelMgr;
	private Date regTime;
	private Integer state;
	private String remark;

	// Constructors

	/** default constructor */
	public Agent() {
	}

	/** full constructor */
	public Agent(String agentsn, String name, String password, String salt,
			String linkman, String tel, String area, String channelMgr,
			Date regTime, Integer state, String remark) {
		this.agentsn = agentsn;
		this.name = name;
		this.password = password;
		this.salt = salt;
		this.linkman = linkman;
		this.tel = tel;
		this.area = area;
		this.channelMgr = channelMgr;
		this.regTime = regTime;
		this.state = state;
		this.remark = remark;
	}

	// Property accessors
	@Id
	@GeneratedValue
	@Column(name = "agentId", unique = true, nullable = false)
	public Integer getAgentId() {
		return this.agentId;
	}

	public void setAgentId(Integer agentId) {
		this.agentId = agentId;
	}

	@Column(name = "agentsn", length = 20)
	public String getAgentsn() {
		return this.agentsn;
	}

	public void setAgentsn(String agentsn) {
		this.agentsn = agentsn;
	}

	@Column(name = "name", length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "password", length = 32)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@Column(name = "salt", length = 10)
	public String getSalt() {
		return this.salt;
	}

	public void setSalt(String salt) {
		this.salt = salt;
	}

	@Column(name = "linkman", length = 20)
	public String getLinkman() {
		return this.linkman;
	}

	public void setLinkman(String linkman) {
		this.linkman = linkman;
	}

	@Column(name = "tel", length = 20)
	public String getTel() {
		return this.tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	@Column(name = "area", length = 200)
	public String getArea() {
		return this.area;
	}

	public void setArea(String area) {
		this.area = area;
	}

	@Column(name = "channelMgr", length = 20)
	public String getChannelMgr() {
		return this.channelMgr;
	}

	public void setChannelMgr(String channelMgr) {
		this.channelMgr = channelMgr;
	}

	@JSON(format="yyyy-MM-dd")
	@Column(name = "regTime", length = 10)
	public Date getRegTime() {
		return this.regTime;
	}

	public void setRegTime(Date regTime) {
		this.regTime = regTime;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "remark", length = 500)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

}